<template>
  <view class="content">
    <view class="components-title">
      <view class="components-title-t">gg-upload-avatar</view>
      <view class="components-title-d">头像上传</view>
    </view>
    <gg-nav-group>
      <gg-upload-avatar label="真实姓名" v-model="formData.name" placeholder="请输入您的真实姓名" labelWidth="" message="input-text示例" />
    </gg-nav-group>

  </view>
</template>

<script>
export default {
  data() {
    return {
      formData: {
        name: "",
      },
      jiage1: '0',
      jiage2: '0',
      name: "",
      tip: '长度必须大于等于两个中文字符'
    };
  },
  onLoad() {
    setTimeout(() => {
      this.testReqMocck().then((res) => {
        this.name = '小明'
        this.formData.name = "小红"
      });
      console.log('模拟请求数据', this.formData, this.name);
    }, 1000)

  },
  methods: {
    bindTimeChange(e) {

    },
    clickTest(e) {
      console.log(this.formData.name)
    },
    testReqMocck(testData) {
      return new Promise((resolve, reject) => {
        resolve({
        });
      });
    }
  }
}
</script>

<style>
page {
  background: #f1f1f1;
}
</style>
